import {createRouter, createWebHistory} from 'vue-router'
import Appointment from "@/router/module/appointment.js";
import System from "@/router/module/system.js";
import NursingManage from "@/router/module/nursingManage.js";
import Dict from "@/router/module/dict.js";
import Layout from "@/layout/index.vue";
import intelMonitor from "@/router/module/device.js";

// 动态菜单
export const asyncRoutes = [...System,...Appointment,...NursingManage,...Dict,...intelMonitor];

const routes = [
    {path:'/',name:'home',component:Layout},
    // {
    //     path: '/',
    //     name: 'home',
    //     component: HomeView,
    //     redirect: '/user',
    //     children: [
    //         {path: '/bed', component: () => import('../views/bed/Bed.vue')},
    //         {path: '/user', component: () => import('../views/system/UserView.vue')},
    //         {path: '/vehicle', component: () => import('../views/vehicle/VehicleView.vue')},
    //         {path: '/geofence', component: () => import('../views/geofence/GeofenceView.vue')},
    //         {path: '/geofenceMap', component: () => import('../views/geofence/GeofenceMapView.vue')},
    //         {path: '/application', component: () => import('../views/schedule/ApplicationView.vue')},
    //         {path: '/audit', component: () => import('../views/schedule/AuditView.vue')},
    //         {path: '/geofenceMapShow', component: () => import('../views/geofence/GeofenceMapShow.vue')},
    //         {path: '/distribute', component: () => import('../views/schedule/DistributeView.vue')},
    //         {path: '/dict', component: () => import('../views/dictionary/DictView.vue')},
    //         {path: '/dictOption', component: () => import('../views/dictionary/DictOptionView.vue')},
    //         {path: '/subscribe', component: () => import('../views/appointment/Subscribe.vue')},
    //         {path: '/comeVisit', component: () => import('../views//appointment/ComeVisit.vue')},
    //         {path: '/checkIn', component: () => import('../views/lnout/CheckInView.vue')},
    //         {path: '/backDown', component: () => import('../views/lnout/BackDownView.vue')},
    //         {path: '/dictOption', component: () => import('../views/dictionary/DictOptionView.vue')},
    //         {path: '/nurseProject', component: () => import('../views/nurse/NurseProjectView.vue')},
    //         {path: '/nursePlan', component: () => import('../views/nurse/NursePlanView.vue')}
    //     ]
    // },
    // ...asyncRoutes,
    { path: '/login', name: 'login', component: () => import('../views/LoginView.vue') }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router